package com.ygglxt.service;

import com.ygglxt.entity.Admin;
import com.ygglxt.util.JdbcUtil;

import java.util.List;

/**
 * 管理业务类
 */
public class AdminService {

    /**
     * 登录
     * @param obj
     * @return
     */
    public Admin login(List<Object> obj) {
        String sql="select * from admin where account=? and pwd=?";
        List<Admin> dto= JdbcUtil.executeQuery(sql, obj,Admin.class);
        if(dto!=null&&dto.size()>=1){
            return dto.get(0);
        }
        return null;
    }


}
